<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>MOVEQ Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">MOVEQ Instruction<BR></h1>
<hr noshade></h1>
          <BR>
          <span class="text">The instruction MOVEQ (MOVE Quick) is used to put small immediate data in a data register. The instruction is two bytes long and can handle constants in the range -128 and +127 (decimal). All 32 bits in the register are affected If you used MOVE.L the instruction would take 6 bytes.</span></P>
          <br>
          <br>
          <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
  <TBODY>
    <TR>
      <TD width="29%" class="text">ADDRESS METHODS:</TD>
      <TD width="71%" class="text">Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s), #x</TD>
    </TR>
  </TBODY>
</TABLE>
<P class="text">DATA LENGTH: Longword</P>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="26%">
  <TBODY>
    <TR>
      <TD width="50%" rowSpan=5 vAlign=top class="text">FLAGS:</TD>
      <TD width="50%" class="text">X - U</TD>
    </TR>
    <TR>
      <TD width="50%" class="text">N - S</TD>
    </TR>
    <TR>
      <TD width="50%" class="text">Z - S</TD>
    </TR>
    <TR>
      <TD width="50%" class="text">C - 0</TD>
    </TR>
    <TR>
      <TD width="50%" class="text">V - 0</TD>
    </TR>
  </TBODY>
</TABLE>
<P><span class="text">SYNTAX: MOVEQ #&lt;data&gt;,Dn<BR>
      <BR>
  Many assemblers automatically change a MOVE to a MOVEQ, if possible.</span></P>
<P><span class="text">EXAMPLE CODE:</span></P>
<P class="sourcecode"><span class="text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
MOVEQ.L&nbsp;&nbsp;&nbsp; #3,D0&nbsp;&nbsp;&nbsp;*puts 3 into D0, but affects 
the entire longword, quicker than move</span></P>
</body>
</html>